"use strict";

const Sequelize = require("sequelize");
const log4js = require("../log-config");
const logger = log4js.getLogger("init");

exports.sequelize = () =>
  new Sequelize("stest", "root", "Zq3974577750", {
    dialect: "mysql",
    // host: "192.168.203.128",
    // host: "172.18.60.139",
    host: "rm-wz910i16yhu60m9a1vo.mysql.rds.aliyuncs.com",
    port: 3306,
    logging: /*console.log or false*/ function(sql) {
      logger.info(sql);
    },
    timezone: "+08:00",
    pool: {
      max: 5,
      min: 0,
      acquire: 30000,
      idle: 10000
    }
  });
